<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<dsp:page>	
<dsp:importbean bean="/atg/dynamo/droplet/ForEach" />
<dsp:importbean bean="/atg/commerce/pricing/PriceItem" />
<dsp:importbean bean="/atg/commerce/pricing/PriceEachItem" />
<dsp:importbean bean="/atg/commerce/order/ShoppingCartModifier" />

		
			<hr>
			<div>
				<h2>Bundle Skus:</h2>
				<dsp:droplet name="ForEach">	
					<dsp:param name="array" param="sku.bundleLinks" />
					<dsp:param name="elementName" value="bundleLink" />
					<dsp:oparam name="output">																
						<dsp:droplet name="ForEach">	
							<dsp:param name="array" param="bundleLink.item.parentProducts" />
							<dsp:param name="elementName" value="parentProduct" />
							<dsp:oparam name="output">																
								<dsp:valueof param="parentProduct.displayName" />
								<div class="img">
									<dsp:getvalueof var="imgUrl"
										param="parentProduct.thumbnailImage.url" />
									<img src="${fn:replace(imgUrl,'../','')}" />
								</div>		

								<p class="qty">
									<span class="blod">Qty:</span>
									<dsp:valueof param="bundleLink.quantity" />
								</p>

								<dsp:droplet name="/atg/commerce/pricing/PriceItem">
									<dsp:param name="product" param="parentProduct.id" />
									<dsp:param name="item" param="bundleLink.item" />
									<dsp:param name="elementName" value="priceItem1" />
									<dsp:oparam name="output">
										<dsp:getvalueof var="salePrice1"
											param="priceItem1.priceInfo.salePrice" />
										<dsp:getvalueof var="discountPrice1"
											param="priceItem1.priceInfo.amount" />
										<p class="price">
											<span class="blod">List Price:</span> <span> <dsp:valueof
													converter="currency"
													param="priceItem1.priceInfo.listPrice" />
											</span>
										</P>
										<p class="price">
											<c:choose>
												<c:when test="${salePrice1 > discountPrice1}">
													<span class="blod">Sale Price:</span>
													<span class="was" style="margin-right: 5px;"> <dsp:valueof
															converter="currency"
															param="priceItem1.priceInfo.salePrice" />
													</span>
													<span class="blod">Discount Price:</span>
													<span class="now"> <dsp:valueof
															converter="currency"
															param="priceItem1.priceInfo.amount" />
													</span>
												</c:when>
												<c:otherwise>
													<span class="blod">Sale Price:</span>
													<span class="now"> <dsp:valueof
															converter="currency"
															param="priceItem1.priceInfo.salePrice"></dsp:valueof>
													</span>
												</c:otherwise>
											</c:choose>
										</p>
										<dsp:getvalueof var="skuid1" param="bundleLink.item.id"/>
										<dsp:input type="hidden" bean="ShoppingCartModifier.catalogRefIds" value="${skuid1}" />
										<div class="availability">
											Availability: <span class="green"> <dsp:include page="checkInventory.jsp?skuid=${skuid1}"/>
											</span>
										</div>
									</dsp:oparam>
								</dsp:droplet>
							</dsp:oparam>	
						</dsp:droplet>	
					</dsp:oparam>
				</dsp:droplet>
			</div>
</dsp:page>